<!DOCTYPE html>












  


<html class="theme-next muse use-motion" lang="zh-Hans">
<head>
  <meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2"/>
<meta name="theme-color" content="#222">












<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />






















<link href="/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css" />

<link href="/css/main.css?v=6.4.0" rel="stylesheet" type="text/css" />


  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png?v=6.4.0">


  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png?v=6.4.0">


  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png?v=6.4.0">


  <link rel="mask-icon" href="/images/logo.svg?v=6.4.0" color="#222">









<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/',
    scheme: 'Muse',
    version: '6.4.0',
    sidebar: {"position":"left","display":"post","offset":12,"b2t":false,"scrollpercent":false,"onmobile":false},
    fancybox: false,
    fastclick: false,
    lazyload: false,
    tabs: true,
    motion: {"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>


  




  <meta name="description" content="Tomcat 我已经使用很久了，但是仅仅停留在 IDE 中通过 Tomcat 启动 Web项目，兑取其中很重部署细节以及管理细节都不太清楚，今天趁着项目需要所有对如下几个细节进行总结，并形成文，方便后续查找。 内容包括：  命令行启动和关闭 Tomcat 配置 Tomcat Tomcat Manager 部署 War包">
<meta name="keywords" content="Tomcat">
<meta property="og:type" content="article">
<meta property="og:title" content="Tomcat 的基本使用">
<meta property="og:url" content="http://yoursite.com/2018/06/05/tomcat-start/index.html">
<meta property="og:site_name" content="ThinkMore">
<meta property="og:description" content="Tomcat 我已经使用很久了，但是仅仅停留在 IDE 中通过 Tomcat 启动 Web项目，兑取其中很重部署细节以及管理细节都不太清楚，今天趁着项目需要所有对如下几个细节进行总结，并形成文，方便后续查找。 内容包括：  命令行启动和关闭 Tomcat 配置 Tomcat Tomcat Manager 部署 War包">
<meta property="og:locale" content="zh-Hans">
<meta property="og:image" content="http://p5h71khzd.bkt.clouddn.com/Tomcat%20Manager.png">
<meta property="og:updated_time" content="2018-07-09T02:48:36.944Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="Tomcat 的基本使用">
<meta name="twitter:description" content="Tomcat 我已经使用很久了，但是仅仅停留在 IDE 中通过 Tomcat 启动 Web项目，兑取其中很重部署细节以及管理细节都不太清楚，今天趁着项目需要所有对如下几个细节进行总结，并形成文，方便后续查找。 内容包括：  命令行启动和关闭 Tomcat 配置 Tomcat Tomcat Manager 部署 War包">
<meta name="twitter:image" content="http://p5h71khzd.bkt.clouddn.com/Tomcat%20Manager.png">






  <link rel="canonical" href="http://yoursite.com/2018/06/05/tomcat-start/"/>



<script type="text/javascript" id="page.configurations">
  CONFIG.page = {
    sidebar: "",
  };
</script>

  <title>Tomcat 的基本使用 | ThinkMore</title>
  






  <script type="text/javascript">
    var _hmt = _hmt || [];
    (function() {
      var hm = document.createElement("script");
      hm.src = "https://hm.baidu.com/hm.js?13172698bcdb7ab00b7d3ec112aae9c1";
      var s = document.getElementsByTagName("script")[0];
      s.parentNode.insertBefore(hm, s);
    })();
  </script>




  <noscript>
  <style type="text/css">
    .use-motion .motion-element,
    .use-motion .brand,
    .use-motion .menu-item,
    .sidebar-inner,
    .use-motion .post-block,
    .use-motion .pagination,
    .use-motion .comments,
    .use-motion .post-header,
    .use-motion .post-body,
    .use-motion .collection-title { opacity: initial; }

    .use-motion .logo,
    .use-motion .site-title,
    .use-motion .site-subtitle {
      opacity: initial;
      top: initial;
    }

    .use-motion {
      .logo-line-before i { left: initial; }
      .logo-line-after i { right: initial; }
    }
  </style>
</noscript>

</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-Hans">

  
  
    
  

  <div class="container sidebar-position-left page-post-detail">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta ">
    

    <div class="custom-logo-site-title">
      <a href="/" class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">ThinkMore</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
    
      
        <p class="site-subtitle">驽马十驾,功在不舍！</p>
      
    
  </div>

  <div class="site-nav-toggle">
    <button aria-label="Toggle navigation bar">
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>



<nav class="site-nav">
  
    <ul id="menu" class="menu">
      
        
        
        
          
          <li class="menu-item menu-item-home">
    <a href="/" rel="section">
      <i class="menu-item-icon fa fa-fw fa-home"></i> <br />Home</a>
  </li>
        
        
        
          
          <li class="menu-item menu-item-archives">
    <a href="/archives/" rel="section">
      <i class="menu-item-icon fa fa-fw fa-archive"></i> <br />Archives</a>
  </li>

      
      
    </ul>
  

  
    

  

  
</nav>



  



</div>
    </header>

    


    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="http://yoursite.com/2018/06/05/tomcat-start/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="文敦复">
      <meta itemprop="description" content="思考的懒惰是真的懒惰！">
      <meta itemprop="image" content="/images/avatar.gif">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="ThinkMore">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">Tomcat 的基本使用
              
            
          </h1>
        

        <div class="post-meta">
          <span class="post-time">

            
            
            

            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">Posted on</span>
              

              
                
              

              <time title="Created: 2018-06-05 20:39:30" itemprop="dateCreated datePublished" datetime="2018-06-05T20:39:30+08:00">2018-06-05</time>
            

            
              

              
                
                <span class="post-meta-divider">|</span>
                

                <span class="post-meta-item-icon">
                  <i class="fa fa-calendar-check-o"></i>
                </span>
                
                  <span class="post-meta-item-text">Edited on</span>
                
                <time title="Modified: 2018-07-09 10:48:36" itemprop="dateModified" datetime="2018-07-09T10:48:36+08:00">2018-07-09</time>
              
            
          </span>

          
            <span class="post-category" >
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">In</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing"><a href="/categories/Tomcat/" itemprop="url" rel="index"><span itemprop="name">Tomcat</span></a></span>

                
                
              
            </span>
          

          
            
          

          
          

          

          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        <p>Tomcat 我已经使用很久了，但是仅仅停留在 IDE 中通过 Tomcat 启动 Web项目，兑取其中很重部署细节以及管理细节都不太清楚，今天趁着项目需要所有对如下几个细节进行总结，并形成文，方便后续查找。</p>
<p>内容包括：</p>
<ol>
<li>命令行启动和关闭 Tomcat</li>
<li>配置 Tomcat</li>
<li>Tomcat Manager</li>
<li>部署 War包 </li>
</ol>
<a id="more"></a>
<h1 id="命令启动-Tomcat"><a href="#命令启动-Tomcat" class="headerlink" title="命令启动 Tomcat"></a>命令启动 Tomcat</h1><p><code>bat</code>是 <code>Win</code>下的脚本格式，<code>sh</code>是<code>Linux</code>下的脚本格式。</p>
<ol>
<li>进入目录<code>/${TOMCAT_HOME}/bin</code>中，可以发现有一个文件为<code>startup.sh</code>和<code>shutdown.sh</code>，其中前者为开启 Tomcat，后一个脚本是关闭。</li>
<li>在终端中通过命令启动：</li>
</ol>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">nohup ./startup.sh &gt; /usr/log/tomcat.log &amp;</span><br></pre></td></tr></table></figure>
<p>如果提示找不到这个命令，可能是因为权限不够，所以通过如下执行授权</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sudo chomod +x *.sh</span><br></pre></td></tr></table></figure>
<p>上述指定将该目录下的所有<code>.sh</code>都赋予了权限。</p>
<ol start="3">
<li>如果需要关闭通过如下指定进行关闭即可。</li>
</ol>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">./shutdown.sh</span><br></pre></td></tr></table></figure>
<h1 id="配置-Tomcat-环境"><a href="#配置-Tomcat-环境" class="headerlink" title="配置 Tomcat 环境"></a>配置 Tomcat 环境</h1><p>修改路径<code>/${TOMCAT_HOME}/conf/server.xml</code>下的信息：</p>
<h2 id="指定-Tomcat编码"><a href="#指定-Tomcat编码" class="headerlink" title="指定 Tomcat编码"></a>指定 Tomcat编码</h2><figure class="highlight xml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">Connector</span> <span class="attr">port</span>=<span class="string">"80"</span> <span class="attr">protocol</span>=<span class="string">"HTTP/1.1"</span></span></span><br><span class="line"><span class="tag">           <span class="attr">connectionTimeout</span>=<span class="string">"20000"</span></span></span><br><span class="line"><span class="tag">           <span class="attr">redirectPort</span>=<span class="string">"8443"</span> </span></span><br><span class="line"><span class="tag">           <span class="attr">URIEncoding</span>=<span class="string">"UTF-8"</span>/&gt;</span></span><br></pre></td></tr></table></figure>
<ol>
<li>添加最后一行的指定编码为<code>UTF-8</code></li>
<li>端口通常都会改为<code>80</code></li>
</ol>
<p>以下给出一个性能优化后的配置方案，仅供参考。</p>
<figure class="highlight xml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">Server</span> <span class="attr">port</span>=<span class="string">"8005"</span> <span class="attr">shutdown</span>=<span class="string">"SHUTDOWN"</span>&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">Listener</span> <span class="attr">className</span>=<span class="string">"org.apache.catalina.startup.VersionLoggerListener"</span> /&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">Listener</span> <span class="attr">className</span>=<span class="string">"org.apache.catalina.core.AprLifecycleListener"</span> <span class="attr">SSLEngine</span>=<span class="string">"on"</span> /&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">Listener</span> <span class="attr">className</span>=<span class="string">"org.apache.catalina.core.JreMemoryLeakPreventionListener"</span> /&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">Listener</span> <span class="attr">className</span>=<span class="string">"org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"</span> /&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">Listener</span> <span class="attr">className</span>=<span class="string">"org.apache.catalina.core.ThreadLocalLeakPreventionListener"</span> /&gt;</span></span><br><span class="line"></span><br><span class="line">  <span class="tag">&lt;<span class="name">Service</span> <span class="attr">name</span>=<span class="string">"Catalina"</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">Connector</span> <span class="attr">port</span>=<span class="string">"8080"</span> <span class="attr">protocol</span>=<span class="string">"org.apache.coyote.http11.Http11Nio2Protocol"</span></span></span><br><span class="line"><span class="tag">      <span class="attr">URIEncoding</span>=<span class="string">"UTF-8"</span></span></span><br><span class="line"><span class="tag">      <span class="attr">enableLookups</span>=<span class="string">"false"</span></span></span><br><span class="line"><span class="tag">      <span class="attr">maxThreads</span>=<span class="string">"2000"</span></span></span><br><span class="line"><span class="tag">      <span class="attr">minSpareThreads</span>=<span class="string">"2000"</span></span></span><br><span class="line"><span class="tag">      <span class="attr">processorCache</span>=<span class="string">"6000"</span></span></span><br><span class="line"><span class="tag">      <span class="attr">acceptCount</span>=<span class="string">"5000"</span></span></span><br><span class="line"><span class="tag">      <span class="attr">maxConnections</span>=<span class="string">"20000"</span></span></span><br><span class="line"><span class="tag">      <span class="attr">connectionTimeout</span>=<span class="string">"15000"</span>  </span></span><br><span class="line"><span class="tag">    /&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">Engine</span> <span class="attr">name</span>=<span class="string">"Catalina"</span> <span class="attr">defaultHost</span>=<span class="string">"localhost"</span>&gt;</span></span><br><span class="line">      <span class="tag">&lt;<span class="name">Host</span> <span class="attr">name</span>=<span class="string">"localhost"</span>  <span class="attr">appBase</span>=<span class="string">"webapps"</span> <span class="attr">unpackWARs</span>=<span class="string">"true"</span> <span class="attr">autoDeploy</span>=<span class="string">"true"</span>&gt;</span></span><br><span class="line">       <span class="comment">&lt;!-- 添加自己的 war 包的设置 --&gt;</span></span><br><span class="line">       <span class="tag">&lt;<span class="name">Context</span> <span class="attr">docBase</span>=<span class="string">"demo"</span> <span class="attr">path</span>=<span class="string">"/lcf"</span> <span class="attr">reloadable</span>=<span class="string">"false"</span> /&gt;</span>    </span><br><span class="line">      <span class="tag">&lt;/<span class="name">Host</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;/<span class="name">Engine</span>&gt;</span></span><br><span class="line">  <span class="tag">&lt;/<span class="name">Service</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">Server</span>&gt;</span></span><br></pre></td></tr></table></figure>
<h2 id="指定-Tomcat-的JVM信息"><a href="#指定-Tomcat-的JVM信息" class="headerlink" title="指定 Tomcat 的JVM信息"></a>指定 Tomcat 的JVM信息</h2><p>可以直接在tomcat 的文件<code>catalina.sh</code>的头部进行设置:</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">JAVA_OPTS="-Xms4096m -Xmx4096m -Xss1024K"</span><br><span class="line">cygwin=false</span><br></pre></td></tr></table></figure>
<p>其中第一行是为了设置 Tomcat的运行环境新加的，设置在 cygwin=false 之前即可。</p>
<h1 id="Tomcat-Manager"><a href="#Tomcat-Manager" class="headerlink" title="Tomcat Manager"></a>Tomcat Manager</h1><p><code>Tomcat Manager</code>是一个Web 端的管理界面，可以通过该界面对应用应用进行启动和停止。</p>
<p>官网地址如右所示，你可以在其中查到更为详细的信息：<a href="https://tomcat.apache.org/tomcat-8.5-doc/manager-howto.html" target="_blank" rel="noopener">https://tomcat.apache.org/tomcat-8.5-doc/manager-howto.html</a></p>
<p><img src="http://p5h71khzd.bkt.clouddn.com/Tomcat%20Manager.png" alt="tomcat-manager"></p>
<p>首先需要修改配置文件：<code>${TOMCAT_HOME}/conf/tomcat-users.xml</code></p>
<p>在其中最后面添加内容：</p>
<figure class="highlight xml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">role</span> <span class="attr">rolename</span>=<span class="string">"manager-gui"</span>/&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">user</span> <span class="attr">username</span>=<span class="string">"admin"</span> <span class="attr">password</span>=<span class="string">"admin123"</span> <span class="attr">roles</span>=<span class="string">"manager-gui,manager-status,manager-script,manager-jmx"</span>/&gt;</span></span><br></pre></td></tr></table></figure>
<blockquote>
<p>我是为了图省事，所以直接为一个用户添加了所有的权限，请你根据自身项目的要求进行权限添加。</p>
</blockquote>
<p>启动后通过浏览器访问：<code>http://localhost:8080/manager/html</code> 进行访问，访问时候需要输入设定的用户名和密码。</p>
<h2 id="Tomcat-的内置角色"><a href="#Tomcat-的内置角色" class="headerlink" title="Tomcat 的内置角色"></a>Tomcat 的内置角色</h2><p>其中 Tomcat 内置的角色如下所示：</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">manager-gui:只允许访问 HTML</span><br><span class="line">manager-status: 只允许访问“服务器状态”的界面</span><br><span class="line">manager-script : 访问对工具友好的纯文本界面以及“服务器状态”界面.</span><br><span class="line">manager-jmx : 通过 JMX 来访问“服务器状态”界面。</span><br></pre></td></tr></table></figure>
<ul>
<li>HTML收到 CROF 的访问，但是 JMX 无法受到保护</li>
<li>gui和 jmx这2个角色不建议授权给同一个用户。</li>
</ul>
<h2 id="提供的功能"><a href="#提供的功能" class="headerlink" title="提供的功能"></a>提供的功能</h2><ul>
<li><p>远程重启和关闭 web 应用</p>
</li>
<li><p>列出部署的应用</p>
</li>
<li><p>查看系统信息</p>
</li>
<li><p>检查内存泄露。</p>
</li>
<li><p>…..</p>
</li>
</ul>
<p>更多的信息请自行查阅官方文档。</p>
<h1 id="部署-Web-项目"><a href="#部署-Web-项目" class="headerlink" title="部署 Web 项目"></a>部署 Web 项目</h1><p>经过实践，最通用的方式如下所示：</p>
<ol>
<li>将<code>demo.war</code>直接放在<code>${TOMCAT_HOME}/webapps</code>下。</li>
<li>然后在<code>${TOMCAT_HOME}/bin/server.xml</code>的<code>host</code>节点下配置</li>
</ol>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">&lt;Context docBase="demo" path="/lcf" reloadable="false" /&gt;</span><br></pre></td></tr></table></figure>
<ul>
<li><code>docBase</code> 为<code>webapps</code>下的相对路径</li>
<li><code>path</code> 为应用名，请根据项目实际需求</li>
<li><code>reloadable</code> 在生产环境应该设置为 <code>false</code>，避免自动加载而产生的资源浪费。</li>
</ul>
<h1 id="总结"><a href="#总结" class="headerlink" title="总结"></a>总结</h1><p>上面就是一些关于Tomcat 部署的总结，希望对大家有帮助。</p>
<blockquote>
<p>您有任何建议和意见，请Email联系: <a href="mailto:hicode_club@163.com" target="_blank" rel="noopener">hicode_club@163.com</a></p>
<p>转载请保留出处 <a href="http://www.hicode.club" target="_blank" rel="noopener">HiCode 俱乐部</a></p>
</blockquote>

      
    </div>

    

    
    
    

    

    

    

    <footer class="post-footer">
      

      
      
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/2018/06/03/centos-start-sh/" rel="next" title="CentOS 开机启动指定 jar 包">
                <i class="fa fa-chevron-left"></i> CentOS 开机启动指定 jar 包
              </a>
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/2018/06/08/springboot-war/" rel="prev" title="SpringBoot 项目打成 war 包部署">
                SpringBoot 项目打成 war 包部署 <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </div>
  
  
  
  </article>


  </div>


          </div>
          

  



        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap">
            Table of Contents
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview-wrap">
            Overview
          </li>
        </ul>
      

      <section class="site-overview-wrap sidebar-panel">
        <div class="site-overview">
          <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
            
              <p class="site-author-name" itemprop="name">文敦复</p>
              <p class="site-description motion-element" itemprop="description">思考的懒惰是真的懒惰！</p>
          </div>

          
            <nav class="site-state motion-element">
              
                <div class="site-state-item site-state-posts">
                
                  <a href="/archives/">
                
                    <span class="site-state-item-count">39</span>
                    <span class="site-state-item-name">posts</span>
                  </a>
                </div>
              

              
                
                
                <div class="site-state-item site-state-categories">
                  
                    
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                    <span class="site-state-item-count">37</span>
                    <span class="site-state-item-name">categories</span>
                  
                </div>
              

              
            </nav>
          

          

          

          
          

          
          

          
            
          
          

        </div>
      </section>

      
      <!--noindex-->
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">

            
              
            

            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-1"><a class="nav-link" href="#命令启动-Tomcat"><span class="nav-number">1.</span> <span class="nav-text">命令启动 Tomcat</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#配置-Tomcat-环境"><span class="nav-number">2.</span> <span class="nav-text">配置 Tomcat 环境</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#指定-Tomcat编码"><span class="nav-number">2.1.</span> <span class="nav-text">指定 Tomcat编码</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#指定-Tomcat-的JVM信息"><span class="nav-number">2.2.</span> <span class="nav-text">指定 Tomcat 的JVM信息</span></a></li></ol></li><li class="nav-item nav-level-1"><a class="nav-link" href="#Tomcat-Manager"><span class="nav-number">3.</span> <span class="nav-text">Tomcat Manager</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#Tomcat-的内置角色"><span class="nav-number">3.1.</span> <span class="nav-text">Tomcat 的内置角色</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#提供的功能"><span class="nav-number">3.2.</span> <span class="nav-text">提供的功能</span></a></li></ol></li><li class="nav-item nav-level-1"><a class="nav-link" href="#部署-Web-项目"><span class="nav-number">4.</span> <span class="nav-text">部署 Web 项目</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#总结"><span class="nav-number">5.</span> <span class="nav-text">总结</span></a></li></ol></div>
            

          </div>
        </section>
      <!--/noindex-->
      

      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright">&copy; <span itemprop="copyrightYear">2018</span>
  <span class="with-love" id="animate">
    <i class="fa fa-user"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">文敦复</span>

  

  
</div>




  <div class="powered-by">Powered by <a class="theme-link" target="_blank" href="https://hexo.io">Hexo</a> v3.7.1</div>



  <span class="post-meta-divider">|</span>



  <div class="theme-info">Theme – <a class="theme-link" target="_blank" href="https://theme-next.org">NexT.Muse</a> v6.4.0</div>




        








        
      </div>
    </footer>

    
      <div class="back-to-top">
        <i class="fa fa-arrow-up"></i>
        
      </div>
    

    
	
    

    
  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>


























  
  
    <script type="text/javascript" src="/lib/jquery/index.js?v=2.1.3"></script>
  

  
  
    <script type="text/javascript" src="/lib/velocity/velocity.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>
  


  


  <script type="text/javascript" src="/js/src/utils.js?v=6.4.0"></script>

  <script type="text/javascript" src="/js/src/motion.js?v=6.4.0"></script>



  
  

  
  <script type="text/javascript" src="/js/src/scrollspy.js?v=6.4.0"></script>
<script type="text/javascript" src="/js/src/post-details.js?v=6.4.0"></script>



  


  <script type="text/javascript" src="/js/src/bootstrap.js?v=6.4.0"></script>



  



  










  





  

  

  

  

  
  

  

  

  

  

  

</body>
</html>
